package cn.yunhe.test;

import java.util.HashMap;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import cn.yunhe.dao.IAdminDao;
import cn.yunhe.model.Admin;
import cn.yunhe.util.SqlSessionFactoryUtil;

public class Demo {

	@Test
	public void test1() {
		SqlSession session = SqlSessionFactoryUtil.getSession();

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("adminName", "admin");
		map.put("adminPass", "admin");

		// Admin admin=session.selectOne("adminLogin", map);

		IAdminDao adminDao = session.getMapper(IAdminDao.class);
		Admin admin = adminDao.adminLogin(map);

		System.out.println("admin=====" + admin.getAdminName());
	}
}
